Skip to content

Joy/ref 5768/df to f#22

Open
PMjoydas wants to merge 3 commits intomasterfrom
joy/REF-5768/DF_to_F
Open

Joy/ref 5768/df to f#22
PMjoydas wants to merge 3 commits intomasterfrom
joy/REF-5768/DF_to_F

Conversation

@PMjoydas
Copy link
Copy Markdown
Contributor

@PMjoydas PMjoydas commented Mar 3, 2019

Component to save DataFrame to file

@PMjoydas PMjoydas self-assigned this Mar 3, 2019
print("stderr- failed to find {}".format(filepath), file=sys.stderr)
raise Exception("file path does not exist: {}".format(filepath))

test_data = pandas.read_csv(filepath)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it is a csv read. Maybe:

  1. change the name of the component to include that.
  2. Expose csv loading options - like header, and so on

suffix_time_stamp = str(int(time.time()))
save_file = filepath + '.' + suffix_time_stamp
sfile = open(save_file, 'w+')
pandas.DataFrame(df_predict_results).to_csv(save_file)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSV saving:

  1. rename accordingly
  2. Add CSV options (like header and so on)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants